using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._LinearReferencingTools
{
    /// <summary>
    /// <para>Calibrate Routes</para>
    /// <para>Recalculates route measures using points.</para>
    /// <para>使用点重新计算路径测量值。</para>
    /// </summary>    
    [DisplayName("Calibrate Routes")]
    public class CalibrateRoutes : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CalibrateRoutes()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_route_features">
        /// <para>Input Route Features</para>
        /// <para>The route features to be calibrated.</para>
        /// <para>要校准的路线特征。</para>
        /// </param>
        /// <param name="_route_id_field">
        /// <para>Route Identifier Field</para>
        /// <para>The field containing values that uniquely identify each route. This field can be numeric or character.</para>
        /// <para>包含唯一标识每个路由的值的字段。此字段可以是数字或字符。</para>
        /// </param>
        /// <param name="_in_point_features">
        /// <para>Input Point Features</para>
        /// <para>The point features used to calibrate the routes.</para>
        /// <para>用于校准路径的点要素。</para>
        /// </param>
        /// <param name="_point_id_field">
        /// <para>Point Identifier Field</para>
        /// <para>The field that identifies the route on which each calibration point is located. The values in this field match those in the route identifier field. This field can be numeric or character.</para>
        /// <para>标识每个校准点所在路径的字段。此字段中的值与路径标识符字段中的值匹配。此字段可以是数字或字符。</para>
        /// </param>
        /// <param name="_measure_field">
        /// <para>Measure Field</para>
        /// <para>The field containing the measure value for each calibration point. This field must be numeric.</para>
        /// <para>包含每个校准点的测量值的字段。此字段必须为数值。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Route Feature Class</para>
        /// <para>The feature class to be created. It can be a shapefile or a geodatabase feature class.</para>
        /// <para>要创建的要素类。它可以是 shapefile 或地理数据库要素类。</para>
        /// </param>
        public CalibrateRoutes(object _in_route_features, object _route_id_field, object _in_point_features, object _point_id_field, object _measure_field, object _out_feature_class)
        {
            this._in_route_features = _in_route_features;
            this._route_id_field = _route_id_field;
            this._in_point_features = _in_point_features;
            this._point_id_field = _point_id_field;
            this._measure_field = _measure_field;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Linear Referencing Tools";

        public override string ToolName => "Calibrate Routes";

        public override string CallName => "lr.CalibrateRoutes";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYDomain", "ZDomain", "configKeyword", "extent", "outputCoordinateSystem", "outputZFlag", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_route_features, _route_id_field, _in_point_features, _point_id_field, _measure_field, _out_feature_class, _calibrate_method.GetGPValue(), _search_radius, _interpolate_between.GetGPValue(), _extrapolate_before.GetGPValue(), _extrapolate_after.GetGPValue(), _ignore_gaps.GetGPValue(), _keep_all_routes.GetGPValue(), _build_index.GetGPValue()];

        /// <summary>
        /// <para>Input Route Features</para>
        /// <para>The route features to be calibrated.</para>
        /// <para>要校准的路线特征。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Route Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_route_features { get; set; }


        /// <summary>
        /// <para>Route Identifier Field</para>
        /// <para>The field containing values that uniquely identify each route. This field can be numeric or character.</para>
        /// <para>包含唯一标识每个路由的值的字段。此字段可以是数字或字符。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Route Identifier Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _route_id_field { get; set; }


        /// <summary>
        /// <para>Input Point Features</para>
        /// <para>The point features used to calibrate the routes.</para>
        /// <para>用于校准路径的点要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Point Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_point_features { get; set; }


        /// <summary>
        /// <para>Point Identifier Field</para>
        /// <para>The field that identifies the route on which each calibration point is located. The values in this field match those in the route identifier field. This field can be numeric or character.</para>
        /// <para>标识每个校准点所在路径的字段。此字段中的值与路径标识符字段中的值匹配。此字段可以是数字或字符。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Point Identifier Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _point_id_field { get; set; }


        /// <summary>
        /// <para>Measure Field</para>
        /// <para>The field containing the measure value for each calibration point. This field must be numeric.</para>
        /// <para>包含每个校准点的测量值的字段。此字段必须为数值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Measure Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _measure_field { get; set; }


        /// <summary>
        /// <para>Output Route Feature Class</para>
        /// <para>The feature class to be created. It can be a shapefile or a geodatabase feature class.</para>
        /// <para>要创建的要素类。它可以是 shapefile 或地理数据库要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Route Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Measure Calculation Method</para>
        /// <para><xdoc>
        ///   <para>Specifies how route measures will be recalculated.</para>
        ///   <bulletList>
        ///     <bullet_item>Distance—Measures will be recalculated using the shortest path distance between the calibration points. This is the default.</bullet_item><para/>
        ///     <bullet_item>Measures—Measures will be recalculated using the pre-existing measure distance between the calibration points.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何重新计算路径测量值。</para>
        ///   <bulletList>
        ///     <bullet_item>距离 - 将使用校准点之间的最短路径距离重新计算测量值。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>测量 - 将使用校准点之间预先存在的测量距离重新计算测量值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Measure Calculation Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _calibrate_method_value _calibrate_method { get; set; } = _calibrate_method_value._DISTANCE;

        public enum _calibrate_method_value
        {
            /// <summary>
            /// <para>Distance</para>
            /// <para>Distance—Measures will be recalculated using the shortest path distance between the calibration points. This is the default.</para>
            /// <para>距离 - 将使用校准点之间的最短路径距离重新计算测量值。这是默认设置。</para>
            /// </summary>
            [Description("Distance")]
            [GPEnumValue("DISTANCE")]
            _DISTANCE,

            /// <summary>
            /// <para>Measures</para>
            /// <para>Measures—Measures will be recalculated using the pre-existing measure distance between the calibration points.</para>
            /// <para>测量 - 将使用校准点之间预先存在的测量距离重新计算测量值。</para>
            /// </summary>
            [Description("Measures")]
            [GPEnumValue("MEASURES")]
            _MEASURES,

        }

        /// <summary>
        /// <para>Search Radius</para>
        /// <para>Limits how far a calibration point can be from a route by specifying the distance and its unit of measure. If the unit of measure is unknown, the units of the coordinate system of the route feature class will be used.</para>
        /// <para>通过指定距离及其测量单位来限制校准点与路径的距离。如果测量单位未知，则将使用路径要素类的坐标系单位。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Search Radius")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string _search_radius { get; set; } = "0 Unknown";


        /// <summary>
        /// <para>Interpolate between calibration points</para>
        /// <para><xdoc>
        ///   <para>Specifies whether measure values will be interpolated between the calibration points.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Interpolate between the calibration points. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Do not interpolate between the calibration points.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否在校准点之间插值测量值。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 （Checked） - 在校准点之间插值。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 （Unchecked） - 不在校准点之间插值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Interpolate between calibration points")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _interpolate_between_value _interpolate_between { get; set; } = _interpolate_between_value._true;

        public enum _interpolate_between_value
        {
            /// <summary>
            /// <para>BETWEEN</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("BETWEEN")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_BETWEEN</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_BETWEEN")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Extrapolate before calibration points</para>
        /// <para><xdoc>
        ///   <para>Specifies whether measure values will be extrapolated before the calibration points.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Extrapolate before the calibration points. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Do not extrapolate before the calibration points.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否在校准点之前外推测量值。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 （Checked） - 在校准点之前外推。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 （Unchecked） - 不要在校准点之前进行外推。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Extrapolate before calibration points")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _extrapolate_before_value _extrapolate_before { get; set; } = _extrapolate_before_value._true;

        public enum _extrapolate_before_value
        {
            /// <summary>
            /// <para>BEFORE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("BEFORE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_BEFORE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_BEFORE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Extrapolate after calibration points</para>
        /// <para><xdoc>
        ///   <para>Specifies whether measure values will be extrapolated after the calibration points.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Extrapolate after the calibration points. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Do not extrapolate after the calibration points.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否在校准点之后外推测量值。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 （Checked） - 在校准点之后进行外推。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 （Unchecked） - 不要在校准点之后进行外推。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Extrapolate after calibration points")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _extrapolate_after_value _extrapolate_after { get; set; } = _extrapolate_after_value._true;

        public enum _extrapolate_after_value
        {
            /// <summary>
            /// <para>AFTER</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("AFTER")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_AFTER</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_AFTER")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Ignore spatial gaps</para>
        /// <para><xdoc>
        ///   <para>Specifies whether spatial gaps will be ignored when recalculating the measures on disjointed routes.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Spatial gaps will be ignored. Measure values will be continuous for disjointed routes. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Do not ignore spatial gaps. The measure values on disjointed routes will have gaps. The gap distance is calculated using the straight-line distance between the endpoints of the disjointed parts.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定在重新计算不相交路径上的度量值时是否忽略空间间隙。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将忽略空间间隙。对于不相交的路径，测量值将是连续的。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不要忽略空间间隙。不相交路径上的测量值将存在间隙。间隙距离是使用不相交零件端点之间的直线距离计算的。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Ignore spatial gaps")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _ignore_gaps_value _ignore_gaps { get; set; } = _ignore_gaps_value._true;

        public enum _ignore_gaps_value
        {
            /// <summary>
            /// <para>IGNORE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("IGNORE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_IGNORE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_IGNORE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Include all features in the output feature class</para>
        /// <para><xdoc>
        ///   <para>Specifies whether route features that do not have any calibration points will be excluded from the output feature class.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Keep all route features in the output feature class. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Do not keep all route features in the output feature class. Features that have no calibration points will be excluded.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否从输出要素类中排除没有任何校准点的路径要素。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 保留输出要素类中的所有路径要素。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不将所有路径要素保留在输出要素类中。没有校准点的特征将被排除。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Include all features in the output feature class")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _keep_all_routes_value _keep_all_routes { get; set; } = _keep_all_routes_value._true;

        public enum _keep_all_routes_value
        {
            /// <summary>
            /// <para>KEEP</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("KEEP")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_KEEP</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_KEEP")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Build index</para>
        /// <para><xdoc>
        ///   <para>Specifies whether an attribute index will be created for the route identifier field that is written to the Output Route Feature Class.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Create an attribute index. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Do not create an attribute index.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否为写入输出路径要素类的路径标识符字段创建属性索引。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 （Checked） - 创建属性索引。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 （Unchecked） - 不创建属性索引。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Build index")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _build_index_value _build_index { get; set; } = _build_index_value._true;

        public enum _build_index_value
        {
            /// <summary>
            /// <para>INDEX</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INDEX")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_INDEX</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_INDEX")]
            [GPEnumValue("false")]
            _false,

        }

        public CalibrateRoutes SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYDomain = null, object ZDomain = null, object configKeyword = null, object extent = null, object outputCoordinateSystem = null, object outputZFlag = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYDomain: XYDomain, ZDomain: ZDomain, configKeyword: configKeyword, extent: extent, outputCoordinateSystem: outputCoordinateSystem, outputZFlag: outputZFlag, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}